package com.atguigu.rabbit.consumer.listener.direct;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Author: Worker Hu
 * @CreateTime: 2024-07-23  17:01
 */
@Component
public class DriectQueue01 {
    @RabbitListener(queues = "direct_queue_01")
    public void directQueue01(Message msg) {
        String s = msg.getBody().toString();
        System.out.println("direct_queue_01 接收到消息：" + msg);
    }
}


